package com.itheima.sh.client.fallback;

import com.itheima.sh.client.FeignUserApi;
import com.itheima.sh.pojo.User;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;


@Component
public class UserFeignApiFallBack implements FeignUserApi {
    @Override
    public User queryById(String username) {
        User user = new User();
        user.setUsername(username);
        user.setName("-1");
        user.setEmail("请求失败");
        return user;
    }
}
